package cn.webrx;

import java.util.Arrays;

public class Reg3 {
    public static void main(String[] args) {
        //System.out.println("afc".matches("[a-f]{3}"));

        //System.out.println("hello-ll".replace("ll", "java"));
        //System.out.println("hello*ll".replaceAll("ll", "java"));

        //删除字符中的空格 和 数字
        String str = "100h33el678lo java 1.8 No.a";
        //System.out.println(str.replace(" ","").replaceAll("\\d",""));//hellojava.
        //System.out.println(str.replace(" ","").replaceAll("\\d+\\.\\d+|\\d",""));//hellojavaNo.a


        System.out.println("张三张三丰张三丽".replace("张三","李四"));
        System.out.println("张三张三丰张三丽".replaceAll("张三","李四"));
        System.out.println("张三张三丰张三丽".replaceFirst("张三","李四"));

        String[] ss = "java,mysql,html,css,python".split(",");
        System.out.println(Arrays.toString(ss));
        String[] s2 = "java2424mysql4html68css9124python".split("\\d+");
        System.out.println(Arrays.toString(s2));

    }
}
